
import { useDatePicker, nearDateBy, dayTimeEnd } from 'pub-bbx-utils';
import { t } from "@src/locales";

export default {
  name: 'time-search-mixin',
  data() {
    const { today, yesterday, lastWeek, lastMonth, nearDate } = useDatePicker()
    return {
      datePicker:[+nearDateBy(6, 'day'), +dayTimeEnd()],
      pickerOptions: {
        shortcuts: [
          today(t('common.time.today')),
          yesterday(t('common.time.yesterday')),
          lastWeek(t('common.time.lastWeek')),
          lastMonth(t('common.time.lastMonth')),
          nearDate(t('common.time.lastThreeMonth'), 3, 'month'),
        ],
      },
    };
  }
}